\hypertarget{classCCryptoEngine}{
\section{\-C\-Crypto\-Engine \-Class \-Reference}
\label{classCCryptoEngine}\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}}
}


\-Implementation of a crypto engine.  




{\ttfamily \#include $<$crypto\-\_\-engine.\-h$>$}

\-Inheritance diagram for \-C\-Crypto\-Engine\-:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.470588cm]{classCCryptoEngine}
\end{center}
\end{figure}
\subsection*{\-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCCryptoEngine_a38cc84bc7319bb5588a620ff41ce7300}{\-C\-Crypto\-Engine} (\hyperlink{structNAudioFormats_1_1SStreamInfo}{\-N\-Audio\-Formats\-::\-S\-Stream\-Info} io\-Stream\-Info)
\item 
virtual \hyperlink{classCCryptoEngine_a1652cec932c163b356e1f75cdeebabe2}{$\sim$\-C\-Crypto\-Engine} ()
\item 
virtual int \hyperlink{classCCryptoEngine_afa42453df8be9a392303d70b4fdef7ce}{embed\-Into\-Samples} (int8\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak)
\begin{DoxyCompactList}\small\item\em hook call for glue code \end{DoxyCompactList}\item 
virtual int \hyperlink{classCCryptoEngine_a56c0cce3de7d609dc7b9d02aedaf269c}{embed\-Into\-Samples} (uint8\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak)
\item 
virtual int \hyperlink{classCCryptoEngine_a4d593436533e1181ff78aee0e5a180cf}{embed\-Into\-Samples} (int16\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak)
\item 
virtual int \hyperlink{classCCryptoEngine_a77d0b14647029fe24da5cf9a98722420}{embed\-Into\-Samples} (uint16\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak)
\item 
virtual int \hyperlink{classCCryptoEngine_ad7bd16eab935a6bb6394023a7d002a1c}{embed\-Into\-Samples} (double $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak)
\item 
virtual int \hyperlink{classCCryptoEngine_a987c8e885306c46278154850f9d08329}{extract\-From\-Samples} (int8\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak, unsigned int p\-In\-Buffer)
\begin{DoxyCompactList}\small\item\em hook call for glue code \end{DoxyCompactList}\item 
virtual int \hyperlink{classCCryptoEngine_aedf491be2045c9e0eb328a7601aeb2b8}{extract\-From\-Samples} (uint8\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak, unsigned int p\-In\-Buffer)
\item 
virtual int \hyperlink{classCCryptoEngine_af2c1e3584afe76a542d710ced83d429d}{extract\-From\-Samples} (int16\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak, unsigned int p\-In\-Buffer)
\item 
virtual int \hyperlink{classCCryptoEngine_ac5923a7e5647d09aead6e2062fdca5d9}{extract\-From\-Samples} (uint16\-\_\-t $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak, unsigned int p\-In\-Buffer)
\item 
virtual int \hyperlink{classCCryptoEngine_a09d61a9930a53ca76c1b940afb1aff88}{extract\-From\-Samples} (double $\ast$p\-Samples, unsigned int p\-Count, unsigned int p\-Leak, unsigned int p\-In\-Buffer)
\item 
virtual void \hyperlink{classCCryptoEngine_a3e15dd4a337b2b5d1d74cc4b0f923cef}{shutdown} ()
\item 
virtual int \hyperlink{classCCryptoEngine_ae509c020577b0be6b45f63a78304314f}{change\-Settings} ()
\item 
virtual int \hyperlink{classCCryptoEngine_abe276f3773c39536ba0ce3c3e3185268}{get\-Num\-Required\-Samples} ()
\begin{DoxyCompactList}\small\item\em determine number of processible samples \end{DoxyCompactList}\item 
virtual std\-::string \hyperlink{classCCryptoEngine_a5fe78aa78cd14bbf52e8c897e128af49}{get\-Ini\-Section\-Name} () const 
\begin{DoxyCompactList}\small\item\em get the abbreviation for the properties reader \end{DoxyCompactList}\item 
virtual \*
\hyperlink{namespaceNAudioFormats_a0f5b4d2b68d4ba2b34bac333d4f5f808}{\-N\-Audio\-Formats\-::\-E\-Samples\-Format} \hyperlink{classCCryptoEngine_a0b8e86c1fa977f571de690f268fa4087}{get\-Samples\-Format} ()
\begin{DoxyCompactList}\small\item\em determine whether samples should be converted to double before handed over to an embedding engine \end{DoxyCompactList}\item 
virtual int \hyperlink{classCCryptoEngine_a19175d4e3c5177453e1b7af2bb956bb8}{encrypt} (double $\ast$data, unsigned int p\-Count)=0
\item 
virtual int \hyperlink{classCCryptoEngine_a3405f0d5fc53cce53f35e2ee03cfb95e}{decrypt} (double $\ast$data, unsigned int p\-Count)=0
\item 
virtual int \hyperlink{classCCryptoEngine_aa5e17ace6d2bc9316b4620a299a8fb48}{cycle\-Cipher\-Stream} ()
\end{DoxyCompactItemize}
\subsection*{\-Static \-Public \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
static char \hyperlink{classCCryptoEngine_a7b43455d18efe22c427ff8fa983ef16c}{hex\-Value} (char p\-Char)
\item 
static void \hyperlink{classCCryptoEngine_a16f88f40bd7409c2f086a0e07ea9b294}{read\-Hex\-String} (const std\-::string \&p\-String, std\-::string \&p\-Hex\-String)
\end{DoxyCompactItemize}
\subsection*{\-Protected \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classCCryptoEngine_a9b0c72a4b82295bdc714a01cc6c6d02e}{calculate\-Sync\-Signal\-Frequencies} ()
\item 
virtual unsigned int \hyperlink{classCCryptoEngine_ab83ba5cc5cd5049b9c0c7581b87eca52}{get\-Samples\-Needed} ()
\item 
virtual void \hyperlink{classCCryptoEngine_a875cfd09f9ee578e10957bcf7e84967d}{init\-Crypto} ()
\end{DoxyCompactItemize}
\subsection*{\-Protected \-Attributes}
\begin{DoxyCompactItemize}
\item 
unsigned int \hyperlink{classCCryptoEngine_a2764aa8f63c1f6d7117564a20dc80885}{m\-Fft\-Frame\-Size}
\begin{DoxyCompactList}\small\item\em the configured \-Fourier sample size \-N \end{DoxyCompactList}\item 
int \hyperlink{classCCryptoEngine_a31c60ccedcdd2d753fe231d1b6c1faaa}{m\-Debug}
\begin{DoxyCompactList}\small\item\em debug on? \end{DoxyCompactList}\item 
std\-::string \hyperlink{classCCryptoEngine_a8625979dbe7231d1e16e5e142bfae6bf}{m\-Cipher\-Stream\-Master\-Algorithm}
\item 
std\-::string \hyperlink{classCCryptoEngine_aed48871dfabffe74b361f6f59b280b3d}{m\-Cipher\-Stream\-Session\-Algorithm}
\item 
std\-::string \hyperlink{classCCryptoEngine_a4b8ee36cb93330ee40006c0c7d479bab}{m\-Cipher\-Stream\-I\-V}
\item 
\hyperlink{classCCipherStream}{\-C\-Cipher\-Stream} $\ast$ \hyperlink{classCCryptoEngine_a0a0af66405290f7411e8f0df0151540d}{m\-Master\-Cipher\-Stream}
\item 
\hyperlink{classCCipherStream}{\-C\-Cipher\-Stream} $\ast$ \hyperlink{classCCryptoEngine_a57e66187e35cfb9f881d53f112ff32cb}{m\-Session\-Cipher\-Stream}
\item 
bool \hyperlink{classCCryptoEngine_a0254b83ef71f47ecc76d8dc970f765ca}{m\-Init\-Sync\-Complete}
\begin{DoxyCompactList}\small\item\em indicates if the first synchronization frame is completed \end{DoxyCompactList}\item 
unsigned int \hyperlink{classCCryptoEngine_a46e645375b49245af0d3af4c0c48f5e8}{m\-Sync\-Signal\-Frequencies} \mbox{[}12\mbox{]}\mbox{[}6\mbox{]}
\begin{DoxyCompactList}\small\item\em frequency patterns for the synchronization \-I\-D \end{DoxyCompactList}\item 
unsigned int \hyperlink{classCCryptoEngine_ae5881bffb16d6b9061491f106145118e}{m\-Current\-Sync\-Signal\-Index}
\begin{DoxyCompactList}\small\item\em the current synchronization \-I\-D number (0-\/11) \end{DoxyCompactList}\item 
unsigned int \hyperlink{classCCryptoEngine_af2de686c8b92194941e3477292b8e160}{m\-Samples\-Offset}
\begin{DoxyCompactList}\small\item\em \-Offset between first sync frame and encrypted data. \end{DoxyCompactList}\item 
double \hyperlink{classCCryptoEngine_a7859ef447331b267e0f3ff4b7c6b9b39}{m\-Initial\-Sync\-Offset}
\begin{DoxyCompactList}\small\item\em the sample number of the first sync frame \end{DoxyCompactList}\item 
double $\ast$ \hyperlink{classCCryptoEngine_a9893a20e194970e35200d67e3fa0708f}{m\-Sync\-Initial}
\begin{DoxyCompactList}\small\item\em \-Initial \-Synchronization \-Signal. \end{DoxyCompactList}\item 
\hyperlink{structNAudioFormats_1_1SStreamInfo}{\-N\-Audio\-Formats\-::\-S\-Stream\-Info} \hyperlink{classCCryptoEngine_a700b8779418a1d73b86a0103de1166b7}{m\-Io\-Stream\-Info}
\item 
\hyperlink{classCFilter}{\-C\-Filter} $\ast$ \hyperlink{classCCryptoEngine_a8358d303f4dbfc5416effc41c689167b}{m\-Filter}
\end{DoxyCompactItemize}
\subsection*{\-Static \-Protected \-Attributes}
\begin{DoxyCompactItemize}
\item 
static const int \hyperlink{classCCryptoEngine_aa9030f87332f97cab3ee157341badbd9}{s\-Num\-Required\-Samples}
\begin{DoxyCompactList}\small\item\em number of processible samples \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Private \-Member \-Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classCCryptoEngine_af3e33ddb09bc74bde17de9313cbe797e}{\-C\-Crypto\-Engine} (const \hyperlink{classCCryptoEngine}{\-C\-Crypto\-Engine} \&)
\item 
\hyperlink{classCCryptoEngine}{\-C\-Crypto\-Engine} \& \hyperlink{classCCryptoEngine_aca1321047b0a566e82a5b499400cc457}{operator=} (const \hyperlink{classCCryptoEngine}{\-C\-Crypto\-Engine} \&)
\item 
double \hyperlink{classCCryptoEngine_a00109822a47c3664ab6fd891c37ff065}{get\-Amplitude\-Of\-Complex} (double $\ast$p\-Complex)
\item 
double \hyperlink{classCCryptoEngine_ad9f82daccbb3b82e3f94193ddfa88f75}{modulus} (double a, double b)
\end{DoxyCompactItemize}
\subsection*{\-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
double \hyperlink{classCCryptoEngine_a383b8a7a62188e6c1a92703272b1512e}{m\-Global\-Sample\-Count}
\begin{DoxyCompactList}\small\item\em sample count since beginning \end{DoxyCompactList}\item 
\hyperlink{classCExtendedBuffer}{\-C\-Extended\-Buffer} \hyperlink{classCCryptoEngine_a709ac55a851ad47376abe96f89784b38}{m\-Input\-Buffer}
\begin{DoxyCompactList}\small\item\em unprocessed data which should go to \-Output\-Buffer \end{DoxyCompactList}\item 
\hyperlink{classCExtendedBuffer}{\-C\-Extended\-Buffer} \hyperlink{classCCryptoEngine_a3fcf88d4c5662368b5c4aeea0b0fbd2b}{m\-Output\-Buffer}
\begin{DoxyCompactList}\small\item\em data which should be put on the line \end{DoxyCompactList}\item 
\hyperlink{classCExtendedBuffer}{\-C\-Extended\-Buffer} \hyperlink{classCCryptoEngine_acc4a9dae2d5d3b3ba35896f927dac46e}{m\-Analysis\-Buffer}
\begin{DoxyCompactList}\small\item\em needed to search the sync signal \end{DoxyCompactList}\item 
\hyperlink{classCExtendedBuffer}{\-C\-Extended\-Buffer} \hyperlink{classCCryptoEngine_a5234a3faf5a84e56ac8cc18218240e28}{m\-Sync\-Signal\-Buffer}
\begin{DoxyCompactList}\small\item\em syncronization signal which should be written \end{DoxyCompactList}\item 
\hyperlink{classCSignalToolkit}{\-C\-Signal\-Toolkit} \hyperlink{classCCryptoEngine_ac6b37184be270d63a20b5ba2f5fd9436}{m\-Signal\-Toolkit}
\begin{DoxyCompactList}\small\item\em different useful tools for signal manipulation \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Static \-Private \-Attributes}
\begin{DoxyCompactItemize}
\item 
static const std\-::string \hyperlink{classCCryptoEngine_a771dc5672c3690791e03d9492f4f2400}{s\-Ini\-Section\-Name}
\end{DoxyCompactItemize}


\subsection{\-Detailed \-Description}
\-Implementation of a crypto engine. 

\begin{DoxyAuthor}{\-Author}
\-Template from stegit-\/2 by gpitsch and rpoisel
\end{DoxyAuthor}
\-This class is a common model for a encryption algorithm. \-It handles the buffering of samples and the synchronization of the communication line. \-The encryption and decryption methods should be implemented by the specific encryption algorithm class 

\subsection{\-Constructor \& \-Destructor \-Documentation}
\hypertarget{classCCryptoEngine_a38cc84bc7319bb5588a620ff41ce7300}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}}
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{\-C\-Crypto\-Engine}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Crypto\-Engine\-::\-C\-Crypto\-Engine (
\begin{DoxyParamCaption}
\item[{{\bf \-N\-Audio\-Formats\-::\-S\-Stream\-Info}}]{io\-Stream\-Info}
\end{DoxyParamCaption}
)}}
\label{classCCryptoEngine_a38cc84bc7319bb5588a620ff41ce7300}
\hypertarget{classCCryptoEngine_a1652cec932c163b356e1f75cdeebabe2}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!$\sim$\-C\-Crypto\-Engine@{$\sim$\-C\-Crypto\-Engine}}
\index{$\sim$\-C\-Crypto\-Engine@{$\sim$\-C\-Crypto\-Engine}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{$\sim$\-C\-Crypto\-Engine}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Crypto\-Engine\-::$\sim$\-C\-Crypto\-Engine (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCCryptoEngine_a1652cec932c163b356e1f75cdeebabe2}
\hypertarget{classCCryptoEngine_af3e33ddb09bc74bde17de9313cbe797e}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}}
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{\-C\-Crypto\-Engine}]{\setlength{\rightskip}{0pt plus 5cm}\-C\-Crypto\-Engine\-::\-C\-Crypto\-Engine (
\begin{DoxyParamCaption}
\item[{const {\bf \-C\-Crypto\-Engine} \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_af3e33ddb09bc74bde17de9313cbe797e}


\subsection{\-Member \-Function \-Documentation}
\hypertarget{classCCryptoEngine_a9b0c72a4b82295bdc714a01cc6c6d02e}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!calculate\-Sync\-Signal\-Frequencies@{calculate\-Sync\-Signal\-Frequencies}}
\index{calculate\-Sync\-Signal\-Frequencies@{calculate\-Sync\-Signal\-Frequencies}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{calculate\-Sync\-Signal\-Frequencies}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Crypto\-Engine\-::calculate\-Sync\-Signal\-Frequencies (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a9b0c72a4b82295bdc714a01cc6c6d02e}
\-Calculates the content of m\-Sync\-Signal\-Frequencies \hypertarget{classCCryptoEngine_ae509c020577b0be6b45f63a78304314f}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!change\-Settings@{change\-Settings}}
\index{change\-Settings@{change\-Settings}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{change\-Settings}]{\setlength{\rightskip}{0pt plus 5cm}int \-C\-Crypto\-Engine\-::change\-Settings (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCCryptoEngine_ae509c020577b0be6b45f63a78304314f}
called by the protocol engine upon settings change (e.\-g. change of embedding parameters) calls set\-Properties and init\-Crypto if this method gets overwritten, the subclass should call set\-Properties and init\-Crypto 

\-Implements \hyperlink{classIEmbeddingEngine_acfc1adf5ae7e28332f825c6f2ae056d2}{\-I\-Embedding\-Engine}.



\-Reimplemented in \hyperlink{classCFrequencyScrambling_a5b7467e7a2d40a1643186b7066c1fdb9}{\-C\-Frequency\-Scrambling}, \hyperlink{classCAdvAmplitudeScrambling_a3c8ebe9537d5b48b8fc84c9b7730e851}{\-C\-Adv\-Amplitude\-Scrambling}, \hyperlink{classCNullCryptoEngine_aeae9b7fbed7186ccd34a533ccd03f0e6}{\-C\-Null\-Crypto\-Engine}, and \hyperlink{classCAmplitudeScrambling_aa2113755623a41093e74d8648069c94f}{\-C\-Amplitude\-Scrambling}.

\hypertarget{classCCryptoEngine_aa5e17ace6d2bc9316b4620a299a8fb48}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!cycle\-Cipher\-Stream@{cycle\-Cipher\-Stream}}
\index{cycle\-Cipher\-Stream@{cycle\-Cipher\-Stream}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{cycle\-Cipher\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}int \-C\-Crypto\-Engine\-::cycle\-Cipher\-Stream (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCCryptoEngine_aa5e17ace6d2bc9316b4620a299a8fb48}
reinitialize the session cipher stream with data from the master cipher stream should be used after some time (fixed or variable) to ensure, that the encryption is strong enough and to enable synchronization between the to communication partners

\begin{DoxyReturn}{\-Returns}
0 for success or error code 
\end{DoxyReturn}
\hypertarget{classCCryptoEngine_a3405f0d5fc53cce53f35e2ee03cfb95e}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!decrypt@{decrypt}}
\index{decrypt@{decrypt}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{decrypt}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::decrypt (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{data, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classCCryptoEngine_a3405f0d5fc53cce53f35e2ee03cfb95e}
abstract method decrypt decrypt p\-Count bytes from data and write them back to data if not enough data is available for decryption, zeros should be written to the data buffer. \-This method needs to be implemented by the actual encryption algorithm class.


\begin{DoxyParams}{\-Parameters}
{\em data} & double array with amplitude values from 0 to 1 \\
\hline
{\em p\-Count} & count of audio samples to work with \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
sample count which can be written to the output 
\end{DoxyReturn}


\-Implemented in \hyperlink{classCFrequencyScrambling_a833eb843ff0de97a801f7f12a5807f60}{\-C\-Frequency\-Scrambling}, \hyperlink{classCAdvAmplitudeScrambling_aecd19de1a33c57aecb169850ccd0b2a7}{\-C\-Adv\-Amplitude\-Scrambling}, \hyperlink{classCNullCryptoEngine_a903d791c225f475c02ce2532b5d7324e}{\-C\-Null\-Crypto\-Engine}, and \hyperlink{classCAmplitudeScrambling_a5ffcd79359d63ca2b1f40fa19ff497ee}{\-C\-Amplitude\-Scrambling}.

\hypertarget{classCCryptoEngine_afa42453df8be9a392303d70b4fdef7ce}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!embed\-Into\-Samples@{embed\-Into\-Samples}}
\index{embed\-Into\-Samples@{embed\-Into\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{embed\-Into\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::embed\-Into\-Samples (
\begin{DoxyParamCaption}
\item[{int8\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_afa42453df8be9a392303d70b4fdef7ce}


hook call for glue code 

called by the voip phone application to embed data into the sample before sending a packet \begin{DoxyNote}{\-Note}
this implicitly reads the data to be embedded from the \hyperlink{classIStegIO}{\-I\-Steg\-I\-O}
\end{DoxyNote}

\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & samples to be modified \\
\hline
{\em p\-Count} & number of samples \\
\hline
{\em p\-Leak} & number of samples not used between last and current call\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
$>$0 for success, 0 for \-E\-O\-F and $<$0 for an error 
\end{DoxyReturn}


\-Implements \hyperlink{classIEmbeddingEngine_a0d4c7dd4a9cef7524a016831042094fe}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a56c0cce3de7d609dc7b9d02aedaf269c}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!embed\-Into\-Samples@{embed\-Into\-Samples}}
\index{embed\-Into\-Samples@{embed\-Into\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{embed\-Into\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::embed\-Into\-Samples (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_a56c0cce3de7d609dc7b9d02aedaf269c}


\-Implements \hyperlink{classIEmbeddingEngine_a508ca9bd6283cd40250a3cbee9a79778}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a4d593436533e1181ff78aee0e5a180cf}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!embed\-Into\-Samples@{embed\-Into\-Samples}}
\index{embed\-Into\-Samples@{embed\-Into\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{embed\-Into\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::embed\-Into\-Samples (
\begin{DoxyParamCaption}
\item[{int16\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_a4d593436533e1181ff78aee0e5a180cf}


\-Implements \hyperlink{classIEmbeddingEngine_aab1d65b5129a308098acab5468e51e3f}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a77d0b14647029fe24da5cf9a98722420}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!embed\-Into\-Samples@{embed\-Into\-Samples}}
\index{embed\-Into\-Samples@{embed\-Into\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{embed\-Into\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::embed\-Into\-Samples (
\begin{DoxyParamCaption}
\item[{uint16\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_a77d0b14647029fe24da5cf9a98722420}


\-Implements \hyperlink{classIEmbeddingEngine_a12b321a2caf8b08d4435e936bd7fa446}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_ad7bd16eab935a6bb6394023a7d002a1c}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!embed\-Into\-Samples@{embed\-Into\-Samples}}
\index{embed\-Into\-Samples@{embed\-Into\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{embed\-Into\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}int \-C\-Crypto\-Engine\-::embed\-Into\-Samples (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCCryptoEngine_ad7bd16eab935a6bb6394023a7d002a1c}
\-Handles the action for audio encryption. \-Buffering, \-Synchronization and \-Encryption are done.


\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & samples to be modified \\
\hline
{\em p\-Count} & number of samples \\
\hline
{\em p\-Leak} & number of samples not used between last and current call \\
\hline
{\em p\-In\-Buffer} & how many samples are left in the buffer. \-If no extra thread is executed for extraction this parameter is always 0.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
0 for success, $>$0 for success and discard of samples for next call, $<$0 for an error 
\end{DoxyReturn}


\-Implements \hyperlink{classIEmbeddingEngine_aa778b0012f0b6d907c7284ce367d16ee}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a19175d4e3c5177453e1b7af2bb956bb8}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!encrypt@{encrypt}}
\index{encrypt@{encrypt}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{encrypt}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::encrypt (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{data, }
\item[{unsigned int}]{p\-Count}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}pure virtual\mbox{]}}}}
\label{classCCryptoEngine_a19175d4e3c5177453e1b7af2bb956bb8}
abstract method encrypt encrypt p\-Count bytes from data and write them back to data if not enough data is available for encryption, zeros should be written to the data buffer. \-This method needs to be implemented by the actual encryption algorithm class.


\begin{DoxyParams}{\-Parameters}
{\em data} & double array with amplitude values from 0 to 1 \\
\hline
{\em p\-Count} & count of audio samples to work with \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
0 for success, $>$0 for success and discard of samples for next call, $<$0 for an error 
\end{DoxyReturn}


\-Implemented in \hyperlink{classCFrequencyScrambling_a7cd3434ecb1b1a4a3033c84f2ca0968e}{\-C\-Frequency\-Scrambling}, \hyperlink{classCAdvAmplitudeScrambling_a7d3feb940147fc32943f62fb85c6c6d1}{\-C\-Adv\-Amplitude\-Scrambling}, \hyperlink{classCNullCryptoEngine_acfe250e7194f1322f30b99b7ac505a5e}{\-C\-Null\-Crypto\-Engine}, and \hyperlink{classCAmplitudeScrambling_a6d55b484deb4e09f17326b0359f2f1cf}{\-C\-Amplitude\-Scrambling}.

\hypertarget{classCCryptoEngine_a987c8e885306c46278154850f9d08329}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!extract\-From\-Samples@{extract\-From\-Samples}}
\index{extract\-From\-Samples@{extract\-From\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{extract\-From\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::extract\-From\-Samples (
\begin{DoxyParamCaption}
\item[{int8\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak, }
\item[{unsigned int}]{p\-In\-Buffer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_a987c8e885306c46278154850f9d08329}


hook call for glue code 

called by the voip phone application to extract data from the sample after receiving a packet \begin{DoxyNote}{\-Note}
this implicitly writes the extracted data to the \hyperlink{classIStegIO}{\-I\-Steg\-I\-O}
\end{DoxyNote}

\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & samples to be modified \\
\hline
{\em p\-Count} & number of samples \\
\hline
{\em p\-Leak} & number of samples not used between last and current call \\
\hline
{\em p\-In\-Buffer} & how many samples are left in the buffer. \-If no extra thread is executed for extraction this parameter is always 0.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
0 for success, $>$0 for success and discard of samples for next call, $<$0 for an error 
\end{DoxyReturn}


\-Implements \hyperlink{classIEmbeddingEngine_afdd4eb903fce7b7ec14ed171c0df64d7}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_aedf491be2045c9e0eb328a7601aeb2b8}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!extract\-From\-Samples@{extract\-From\-Samples}}
\index{extract\-From\-Samples@{extract\-From\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{extract\-From\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::extract\-From\-Samples (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak, }
\item[{unsigned int}]{p\-In\-Buffer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_aedf491be2045c9e0eb328a7601aeb2b8}


\-Implements \hyperlink{classIEmbeddingEngine_a952b08b4f543a8bdd3ca53e46c16b087}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_af2c1e3584afe76a542d710ced83d429d}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!extract\-From\-Samples@{extract\-From\-Samples}}
\index{extract\-From\-Samples@{extract\-From\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{extract\-From\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::extract\-From\-Samples (
\begin{DoxyParamCaption}
\item[{int16\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak, }
\item[{unsigned int}]{p\-In\-Buffer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_af2c1e3584afe76a542d710ced83d429d}


\-Implements \hyperlink{classIEmbeddingEngine_a476e58ee9839c3d29cf308b056d2b0d3}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_ac5923a7e5647d09aead6e2062fdca5d9}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!extract\-From\-Samples@{extract\-From\-Samples}}
\index{extract\-From\-Samples@{extract\-From\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{extract\-From\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::extract\-From\-Samples (
\begin{DoxyParamCaption}
\item[{uint16\-\_\-t $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak, }
\item[{unsigned int}]{p\-In\-Buffer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_ac5923a7e5647d09aead6e2062fdca5d9}


\-Implements \hyperlink{classIEmbeddingEngine_af077ceeacbe720f5b588950c4140a096}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a09d61a9930a53ca76c1b940afb1aff88}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!extract\-From\-Samples@{extract\-From\-Samples}}
\index{extract\-From\-Samples@{extract\-From\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{extract\-From\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}int \-C\-Crypto\-Engine\-::extract\-From\-Samples (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Samples, }
\item[{unsigned int}]{p\-Count, }
\item[{unsigned int}]{p\-Leak, }
\item[{unsigned int}]{p\-In\-Buffer}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCCryptoEngine_a09d61a9930a53ca76c1b940afb1aff88}
\-Handles the action for audio decryption. \-Buffering, \-Synchronization and \-Encryption are done.


\begin{DoxyParams}{\-Parameters}
{\em p\-Samples} & samples to be modified \\
\hline
{\em p\-Count} & number of samples \\
\hline
{\em p\-Leak} & number of samples not used between last and current call \\
\hline
{\em p\-In\-Buffer} & how many samples are left in the buffer. \-If no extra thread is executed for extraction this parameter is always 0.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}

\end{DoxyReturn}
\-Search for the \-I\-D signal starts here \-T\-O\-D\-O\-: the correlation doesn't work correct yet

\-Implements \hyperlink{classIEmbeddingEngine_a5d7b877de16fb5e8479ce83f75b88ae1}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a00109822a47c3664ab6fd891c37ff065}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!get\-Amplitude\-Of\-Complex@{get\-Amplitude\-Of\-Complex}}
\index{get\-Amplitude\-Of\-Complex@{get\-Amplitude\-Of\-Complex}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{get\-Amplitude\-Of\-Complex}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Crypto\-Engine\-::get\-Amplitude\-Of\-Complex (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{p\-Complex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_a00109822a47c3664ab6fd891c37ff065}
\hypertarget{classCCryptoEngine_a5fe78aa78cd14bbf52e8c897e128af49}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!get\-Ini\-Section\-Name@{get\-Ini\-Section\-Name}}
\index{get\-Ini\-Section\-Name@{get\-Ini\-Section\-Name}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{get\-Ini\-Section\-Name}]{\setlength{\rightskip}{0pt plus 5cm}virtual std\-::string \-C\-Crypto\-Engine\-::get\-Ini\-Section\-Name (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_a5fe78aa78cd14bbf52e8c897e128af49}


get the abbreviation for the properties reader 

\begin{DoxyReturn}{\-Returns}
the abbreviation for the properties reader 
\end{DoxyReturn}


\-Implements \hyperlink{classIEmbeddingEngine_a58c6fd3df13135b91956c42b2f3519a6}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_abe276f3773c39536ba0ce3c3e3185268}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!get\-Num\-Required\-Samples@{get\-Num\-Required\-Samples}}
\index{get\-Num\-Required\-Samples@{get\-Num\-Required\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{get\-Num\-Required\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}virtual int \-C\-Crypto\-Engine\-::get\-Num\-Required\-Samples (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_abe276f3773c39536ba0ce3c3e3185268}


determine number of processible samples 

called by the samples distributor to determine the number of samples which can be processed by the embedding engine; this can be a dynamic value or constant (e.\-g. for \-L\-S\-B, or echo-\/hiding) all the time

\begin{DoxyReturn}{\-Returns}
the number of processible samples 
\end{DoxyReturn}


\-Implements \hyperlink{classIEmbeddingEngine_aaeb36f7905d85f9df65b7ba565419888}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_a0b8e86c1fa977f571de690f268fa4087}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!get\-Samples\-Format@{get\-Samples\-Format}}
\index{get\-Samples\-Format@{get\-Samples\-Format}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{get\-Samples\-Format}]{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf \-N\-Audio\-Formats\-::\-E\-Samples\-Format} \-C\-Crypto\-Engine\-::get\-Samples\-Format (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline, virtual\mbox{]}}}}
\label{classCCryptoEngine_a0b8e86c1fa977f571de690f268fa4087}


determine whether samples should be converted to double before handed over to an embedding engine 

\begin{DoxyReturn}{\-Returns}
\-O\-R\-I\-G\-I\-N\-A\-L or \-M\-O\-D\-I\-F\-I\-E\-D 
\end{DoxyReturn}


\-Implements \hyperlink{classIEmbeddingEngine_af1afa2bc32d63b5505a27da584c4a474}{\-I\-Embedding\-Engine}.

\hypertarget{classCCryptoEngine_ab83ba5cc5cd5049b9c0c7581b87eca52}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!get\-Samples\-Needed@{get\-Samples\-Needed}}
\index{get\-Samples\-Needed@{get\-Samples\-Needed}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{get\-Samples\-Needed}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int \-C\-Crypto\-Engine\-::get\-Samples\-Needed (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, virtual\mbox{]}}}}
\label{classCCryptoEngine_ab83ba5cc5cd5049b9c0c7581b87eca52}
\-Describes the size of samples buffered before processed. \-Exactly this many samples will be passed to the \hyperlink{classCCryptoEngine_a19175d4e3c5177453e1b7af2bb956bb8}{encrypt()} and \hyperlink{classCCryptoEngine_a3405f0d5fc53cce53f35e2ee03cfb95e}{decrypt()} method. \-If the sub-\/class want's a different size of samples it can override this method and return the wanted size. \-Per default the \-F\-F\-T \-Framesize will be returned. \begin{DoxyReturn}{\-Returns}
sample count which will be buffered before further processing 
\end{DoxyReturn}


\-Reimplemented in \hyperlink{classCFrequencyScrambling_ad117dc8d000544f06161c83d39e96aae}{\-C\-Frequency\-Scrambling}.

\hypertarget{classCCryptoEngine_a7b43455d18efe22c427ff8fa983ef16c}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!hex\-Value@{hex\-Value}}
\index{hex\-Value@{hex\-Value}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{hex\-Value}]{\setlength{\rightskip}{0pt plus 5cm}char \-C\-Crypto\-Engine\-::hex\-Value (
\begin{DoxyParamCaption}
\item[{char}]{p\-Char}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classCCryptoEngine_a7b43455d18efe22c427ff8fa983ef16c}
\-Returns the decimal value of a hexadecimal \-A\-S\-C\-I\-I digit e.\-g. 0-\/9, a-\/f. \-If b is passed to the method, 11 is returned


\begin{DoxyParams}{\-Parameters}
{\em p\-Char} & hexadecimal digit as \-A\-S\-C\-I\-I \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
decimal value of p\-Char 
\end{DoxyReturn}
\hypertarget{classCCryptoEngine_a875cfd09f9ee578e10957bcf7e84967d}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!init\-Crypto@{init\-Crypto}}
\index{init\-Crypto@{init\-Crypto}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{init\-Crypto}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Crypto\-Engine\-::init\-Crypto (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected, virtual\mbox{]}}}}
\label{classCCryptoEngine_a875cfd09f9ee578e10957bcf7e84967d}
init cyrpto engine don't forget to call super method \hypertarget{classCCryptoEngine_ad9f82daccbb3b82e3f94193ddfa88f75}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!modulus@{modulus}}
\index{modulus@{modulus}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{modulus}]{\setlength{\rightskip}{0pt plus 5cm}double \-C\-Crypto\-Engine\-::modulus (
\begin{DoxyParamCaption}
\item[{double}]{a, }
\item[{double}]{b}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_ad9f82daccbb3b82e3f94193ddfa88f75}
\-Calculates the modulus of two double values (a/b)


\begin{DoxyParams}{\-Parameters}
{\em a} & \-The dividend \\
\hline
{\em b} & \-The divisor\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{\-Returns}
\-The rest 
\end{DoxyReturn}
\hypertarget{classCCryptoEngine_aca1321047b0a566e82a5b499400cc457}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!operator=@{operator=}}
\index{operator=@{operator=}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{operator=}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Crypto\-Engine}\& \-C\-Crypto\-Engine\-::operator= (
\begin{DoxyParamCaption}
\item[{const {\bf \-C\-Crypto\-Engine} \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_aca1321047b0a566e82a5b499400cc457}
\hypertarget{classCCryptoEngine_a16f88f40bd7409c2f086a0e07ea9b294}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!read\-Hex\-String@{read\-Hex\-String}}
\index{read\-Hex\-String@{read\-Hex\-String}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{read\-Hex\-String}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Crypto\-Engine\-::read\-Hex\-String (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{p\-String, }
\item[{std\-::string \&}]{p\-Hex\-String}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}static\mbox{]}}}}
\label{classCCryptoEngine_a16f88f40bd7409c2f086a0e07ea9b294}
\-Gets out of a string a hexadecimal string.


\begin{DoxyParams}{\-Parameters}
{\em p\-String} & some string @üaram p\-Hex\-Tring hexadecimal string \\
\hline
\end{DoxyParams}
\hypertarget{classCCryptoEngine_a3e15dd4a337b2b5d1d74cc4b0f923cef}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!shutdown@{shutdown}}
\index{shutdown@{shutdown}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{shutdown}]{\setlength{\rightskip}{0pt plus 5cm}void \-C\-Crypto\-Engine\-::shutdown (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classCCryptoEngine_a3e15dd4a337b2b5d1d74cc4b0f923cef}
called from the engine factory before destroying the handle 

\-Implements \hyperlink{classIEmbeddingEngine_a17d63e5e13b91c9121444833cf5de626}{\-I\-Embedding\-Engine}.



\subsection{\-Member \-Data \-Documentation}
\hypertarget{classCCryptoEngine_acc4a9dae2d5d3b3ba35896f927dac46e}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Analysis\-Buffer@{m\-Analysis\-Buffer}}
\index{m\-Analysis\-Buffer@{m\-Analysis\-Buffer}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Analysis\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Extended\-Buffer} {\bf \-C\-Crypto\-Engine\-::m\-Analysis\-Buffer}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_acc4a9dae2d5d3b3ba35896f927dac46e}


needed to search the sync signal 

\hypertarget{classCCryptoEngine_a4b8ee36cb93330ee40006c0c7d479bab}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Cipher\-Stream\-I\-V@{m\-Cipher\-Stream\-I\-V}}
\index{m\-Cipher\-Stream\-I\-V@{m\-Cipher\-Stream\-I\-V}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Cipher\-Stream\-I\-V}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string {\bf \-C\-Crypto\-Engine\-::m\-Cipher\-Stream\-I\-V}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a4b8ee36cb93330ee40006c0c7d479bab}
\hypertarget{classCCryptoEngine_a8625979dbe7231d1e16e5e142bfae6bf}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Cipher\-Stream\-Master\-Algorithm@{m\-Cipher\-Stream\-Master\-Algorithm}}
\index{m\-Cipher\-Stream\-Master\-Algorithm@{m\-Cipher\-Stream\-Master\-Algorithm}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Cipher\-Stream\-Master\-Algorithm}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string {\bf \-C\-Crypto\-Engine\-::m\-Cipher\-Stream\-Master\-Algorithm}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a8625979dbe7231d1e16e5e142bfae6bf}
\hypertarget{classCCryptoEngine_aed48871dfabffe74b361f6f59b280b3d}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Cipher\-Stream\-Session\-Algorithm@{m\-Cipher\-Stream\-Session\-Algorithm}}
\index{m\-Cipher\-Stream\-Session\-Algorithm@{m\-Cipher\-Stream\-Session\-Algorithm}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Cipher\-Stream\-Session\-Algorithm}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string {\bf \-C\-Crypto\-Engine\-::m\-Cipher\-Stream\-Session\-Algorithm}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_aed48871dfabffe74b361f6f59b280b3d}
\hypertarget{classCCryptoEngine_ae5881bffb16d6b9061491f106145118e}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Current\-Sync\-Signal\-Index@{m\-Current\-Sync\-Signal\-Index}}
\index{m\-Current\-Sync\-Signal\-Index@{m\-Current\-Sync\-Signal\-Index}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Current\-Sync\-Signal\-Index}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Crypto\-Engine\-::m\-Current\-Sync\-Signal\-Index}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_ae5881bffb16d6b9061491f106145118e}


the current synchronization \-I\-D number (0-\/11) 

\hypertarget{classCCryptoEngine_a31c60ccedcdd2d753fe231d1b6c1faaa}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Debug@{m\-Debug}}
\index{m\-Debug@{m\-Debug}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Debug}]{\setlength{\rightskip}{0pt plus 5cm}int {\bf \-C\-Crypto\-Engine\-::m\-Debug}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a31c60ccedcdd2d753fe231d1b6c1faaa}


debug on? 

\hypertarget{classCCryptoEngine_a2764aa8f63c1f6d7117564a20dc80885}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Fft\-Frame\-Size@{m\-Fft\-Frame\-Size}}
\index{m\-Fft\-Frame\-Size@{m\-Fft\-Frame\-Size}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Fft\-Frame\-Size}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Crypto\-Engine\-::m\-Fft\-Frame\-Size}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a2764aa8f63c1f6d7117564a20dc80885}


the configured \-Fourier sample size \-N 

\hypertarget{classCCryptoEngine_a8358d303f4dbfc5416effc41c689167b}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Filter@{m\-Filter}}
\index{m\-Filter@{m\-Filter}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Filter}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Filter}$\ast$ {\bf \-C\-Crypto\-Engine\-::m\-Filter}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a8358d303f4dbfc5416effc41c689167b}
\hypertarget{classCCryptoEngine_a383b8a7a62188e6c1a92703272b1512e}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Global\-Sample\-Count@{m\-Global\-Sample\-Count}}
\index{m\-Global\-Sample\-Count@{m\-Global\-Sample\-Count}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Global\-Sample\-Count}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf \-C\-Crypto\-Engine\-::m\-Global\-Sample\-Count}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_a383b8a7a62188e6c1a92703272b1512e}


sample count since beginning 

\hypertarget{classCCryptoEngine_a7859ef447331b267e0f3ff4b7c6b9b39}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Initial\-Sync\-Offset@{m\-Initial\-Sync\-Offset}}
\index{m\-Initial\-Sync\-Offset@{m\-Initial\-Sync\-Offset}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Initial\-Sync\-Offset}]{\setlength{\rightskip}{0pt plus 5cm}double {\bf \-C\-Crypto\-Engine\-::m\-Initial\-Sync\-Offset}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a7859ef447331b267e0f3ff4b7c6b9b39}


the sample number of the first sync frame 

\hypertarget{classCCryptoEngine_a0254b83ef71f47ecc76d8dc970f765ca}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Init\-Sync\-Complete@{m\-Init\-Sync\-Complete}}
\index{m\-Init\-Sync\-Complete@{m\-Init\-Sync\-Complete}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Init\-Sync\-Complete}]{\setlength{\rightskip}{0pt plus 5cm}bool {\bf \-C\-Crypto\-Engine\-::m\-Init\-Sync\-Complete}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a0254b83ef71f47ecc76d8dc970f765ca}


indicates if the first synchronization frame is completed 

\hypertarget{classCCryptoEngine_a709ac55a851ad47376abe96f89784b38}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Input\-Buffer@{m\-Input\-Buffer}}
\index{m\-Input\-Buffer@{m\-Input\-Buffer}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Input\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Extended\-Buffer} {\bf \-C\-Crypto\-Engine\-::m\-Input\-Buffer}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_a709ac55a851ad47376abe96f89784b38}


unprocessed data which should go to \-Output\-Buffer 

\hypertarget{classCCryptoEngine_a700b8779418a1d73b86a0103de1166b7}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Io\-Stream\-Info@{m\-Io\-Stream\-Info}}
\index{m\-Io\-Stream\-Info@{m\-Io\-Stream\-Info}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Io\-Stream\-Info}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-N\-Audio\-Formats\-::\-S\-Stream\-Info} {\bf \-C\-Crypto\-Engine\-::m\-Io\-Stream\-Info}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a700b8779418a1d73b86a0103de1166b7}
\-The \-I\-O stream info containing, for example, the sample rate \hypertarget{classCCryptoEngine_a0a0af66405290f7411e8f0df0151540d}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Master\-Cipher\-Stream@{m\-Master\-Cipher\-Stream}}
\index{m\-Master\-Cipher\-Stream@{m\-Master\-Cipher\-Stream}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Master\-Cipher\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Cipher\-Stream}$\ast$ {\bf \-C\-Crypto\-Engine\-::m\-Master\-Cipher\-Stream}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a0a0af66405290f7411e8f0df0151540d}
\hypertarget{classCCryptoEngine_a3fcf88d4c5662368b5c4aeea0b0fbd2b}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Output\-Buffer@{m\-Output\-Buffer}}
\index{m\-Output\-Buffer@{m\-Output\-Buffer}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Output\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Extended\-Buffer} {\bf \-C\-Crypto\-Engine\-::m\-Output\-Buffer}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_a3fcf88d4c5662368b5c4aeea0b0fbd2b}


data which should be put on the line 

\hypertarget{classCCryptoEngine_af2de686c8b92194941e3477292b8e160}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Samples\-Offset@{m\-Samples\-Offset}}
\index{m\-Samples\-Offset@{m\-Samples\-Offset}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Samples\-Offset}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Crypto\-Engine\-::m\-Samples\-Offset}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_af2de686c8b92194941e3477292b8e160}


\-Offset between first sync frame and encrypted data. 

\hypertarget{classCCryptoEngine_a57e66187e35cfb9f881d53f112ff32cb}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Session\-Cipher\-Stream@{m\-Session\-Cipher\-Stream}}
\index{m\-Session\-Cipher\-Stream@{m\-Session\-Cipher\-Stream}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Session\-Cipher\-Stream}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Cipher\-Stream}$\ast$ {\bf \-C\-Crypto\-Engine\-::m\-Session\-Cipher\-Stream}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a57e66187e35cfb9f881d53f112ff32cb}
\hypertarget{classCCryptoEngine_ac6b37184be270d63a20b5ba2f5fd9436}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Signal\-Toolkit@{m\-Signal\-Toolkit}}
\index{m\-Signal\-Toolkit@{m\-Signal\-Toolkit}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Signal\-Toolkit}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Signal\-Toolkit} {\bf \-C\-Crypto\-Engine\-::m\-Signal\-Toolkit}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_ac6b37184be270d63a20b5ba2f5fd9436}


different useful tools for signal manipulation 

\hypertarget{classCCryptoEngine_a9893a20e194970e35200d67e3fa0708f}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Sync\-Initial@{m\-Sync\-Initial}}
\index{m\-Sync\-Initial@{m\-Sync\-Initial}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Sync\-Initial}]{\setlength{\rightskip}{0pt plus 5cm}double$\ast$ {\bf \-C\-Crypto\-Engine\-::m\-Sync\-Initial}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a9893a20e194970e35200d67e3fa0708f}


\-Initial \-Synchronization \-Signal. 

\hypertarget{classCCryptoEngine_a5234a3faf5a84e56ac8cc18218240e28}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Sync\-Signal\-Buffer@{m\-Sync\-Signal\-Buffer}}
\index{m\-Sync\-Signal\-Buffer@{m\-Sync\-Signal\-Buffer}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Sync\-Signal\-Buffer}]{\setlength{\rightskip}{0pt plus 5cm}{\bf \-C\-Extended\-Buffer} {\bf \-C\-Crypto\-Engine\-::m\-Sync\-Signal\-Buffer}\hspace{0.3cm}{\ttfamily  \mbox{[}private\mbox{]}}}}
\label{classCCryptoEngine_a5234a3faf5a84e56ac8cc18218240e28}


syncronization signal which should be written 

\hypertarget{classCCryptoEngine_a46e645375b49245af0d3af4c0c48f5e8}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!m\-Sync\-Signal\-Frequencies@{m\-Sync\-Signal\-Frequencies}}
\index{m\-Sync\-Signal\-Frequencies@{m\-Sync\-Signal\-Frequencies}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{m\-Sync\-Signal\-Frequencies}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int {\bf \-C\-Crypto\-Engine\-::m\-Sync\-Signal\-Frequencies}\mbox{[}12\mbox{]}\mbox{[}6\mbox{]}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classCCryptoEngine_a46e645375b49245af0d3af4c0c48f5e8}


frequency patterns for the synchronization \-I\-D 

\hypertarget{classCCryptoEngine_a771dc5672c3690791e03d9492f4f2400}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!s\-Ini\-Section\-Name@{s\-Ini\-Section\-Name}}
\index{s\-Ini\-Section\-Name@{s\-Ini\-Section\-Name}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{s\-Ini\-Section\-Name}]{\setlength{\rightskip}{0pt plus 5cm}const std\-::string {\bf \-C\-Crypto\-Engine\-::s\-Ini\-Section\-Name}\hspace{0.3cm}{\ttfamily  \mbox{[}static, private\mbox{]}}}}
\label{classCCryptoEngine_a771dc5672c3690791e03d9492f4f2400}


\-Reimplemented in \hyperlink{classCAdvAmplitudeScrambling_a99fd7f064206449f6fefe70503d330fc}{\-C\-Adv\-Amplitude\-Scrambling}, \hyperlink{classCFrequencyScrambling_a47c6e1f6437bce45fff18bda1d9eb652}{\-C\-Frequency\-Scrambling}, \hyperlink{classCAmplitudeScrambling_a9e0ffd48421e22d77d88bff3413f7a92}{\-C\-Amplitude\-Scrambling}, and \hyperlink{classCNullCryptoEngine_a769c429a213aeabdccab36f2f70681ca}{\-C\-Null\-Crypto\-Engine}.

\hypertarget{classCCryptoEngine_aa9030f87332f97cab3ee157341badbd9}{
\index{\-C\-Crypto\-Engine@{\-C\-Crypto\-Engine}!s\-Num\-Required\-Samples@{s\-Num\-Required\-Samples}}
\index{s\-Num\-Required\-Samples@{s\-Num\-Required\-Samples}!CCryptoEngine@{\-C\-Crypto\-Engine}}
\subsubsection[{s\-Num\-Required\-Samples}]{\setlength{\rightskip}{0pt plus 5cm}const int {\bf \-C\-Crypto\-Engine\-::s\-Num\-Required\-Samples}\hspace{0.3cm}{\ttfamily  \mbox{[}static, protected\mbox{]}}}}
\label{classCCryptoEngine_aa9030f87332f97cab3ee157341badbd9}


number of processible samples 



\-The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
\hyperlink{crypto__engine_8h}{crypto\-\_\-engine.\-h}\item 
\hyperlink{crypto__engine_8cxx}{crypto\-\_\-engine.\-cxx}\end{DoxyCompactItemize}
